package com.chinasoft.main;

import com.chinasoft.class1.group1.Group11;
import com.chinasoft.class1.group2.Group12;
import com.chinasoft.class1.group3.Group13;
import com.chinasoft.class1.group4.Group14;
import com.chinasoft.class1.group1.teacher.ZhangWenTrueWord;
import com.chinasoft.class1.group4.Group14;

import com.chinasoft.class1.group4.Group14;
import com.chinasoft.class5.group2.Group52;
import com.chinasoft.class5.group3.Group53;
import com.chinasoft.class6.group2.Group62;
import com.chinasoft.class5.group3.Group55;

import com.chinasoft.class6.group3.Group63;
import com.chinasoft.class6.group5.Group65;
import com.chinasoft.class5.group1.Group51;
import com.chinasoft.class5.group3.Group53;
import com.chinasoft.class5.group4.Group54;
import com.chinasoft.class6.group1.Group61;
import com.chinasoft.class6.group2.Group62;
import com.chinasoft.class6.group4.Group64;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Scanner;

public class TwMain {
    /**
     * 主函数，程序入口点
     * 该函数随机选择列表中的TrueWord对象并输出其名称和话语
     *
     * @param args 命令行参数数组
     */
    public static void main(String[] args) {
        List<TrueWord> twList = new ArrayList();
//        twList.add(new ZhangWenTrueWord());

        List<List<TrueWord>> groupListList = new ArrayList();
        // group11列表添加
        groupListList.add(new Group11().getGroupList());
        // group12列表添加
        groupListList.add(new Group12().getGroupList());
        // group13列表添加
        groupListList.add(new Group13().getGroupList());



        // group14列表添加
        groupListList.add(new Group14().getGroupList());
        // group51列表添加
        groupListList.add(new Group51().getGroupList());

        // group52列表添加
        groupListList.add(new Group52().getGroupList());
        // group53列表添加
        groupListList.add(new Group53().getGroupList());
        groupListList.add(new Group54().getGroupList());
         // group55列表添加
        groupListList.add(new Group55().getGroupList());
        // group61列表添加
        groupListList.add(new Group61().getGroupList());

        // group62列表添加
        groupListList.add(new Group62().getGroupList());
        groupListList.add(new Group63().getGroupList());

        // group63列表添加
        groupListList.add(new Group63().getGroupList());
        // group64列表添加
        groupListList.add(new Group64().getGroupList());

        // group65列表添加
        groupListList.add(new Group65().getGroupList());

        for (List<TrueWord> groupList : groupListList) {
            for (TrueWord tw : groupList) {
                twList.add(tw);
            }
        }


        Random random = new Random();
        Scanner scanner = new Scanner(System.in);

        // 无限循环，随机选择并显示TrueWord对象的信息
        for(;;) {
            int index = random.nextInt(twList.size());
            TrueWord tw = twList.get(index);
            System.out.println(tw.getName() + " 说 " + tw.getWord());
            scanner.nextLine();
        }

    }

}
